Latest Microsoft Dynamics 365 Blogs | CloudFronts

How to avoid data deletion when Dynamics NAV 2018 extension is published from VS Code

Introduction: There was a bug till NAV 2018 CU 1 update that whenever a NAV 2018 extension is published from VS Code, all the data which was inserted earlier gets deleted. Pre-requisites: Microsoft Dynamics NAV 2018 CU 2 Visual studio code (VS Code) Steps: 1. Install Microsoft Dynamics NAV 2018 CU 2 2. Install VSIX Extension for VS Code Click on Extension button at the Left corner of VS code. Click on the more button ( three dots) and select Install from VSIX. Navigate to the path  “CU 02 NAV 2018 NA\NAV.11.0.20348.NA.DVD\ModernDev\program files\Microsoft Dynamics NAV\110\Modern Development Environment” to install VSIX. 3. Open the launch.json file and enter schemaUpdateMode to synchronize How data synchronization works? The data synchronization between each publish is controlled by schemaUpdateMode setting, which is specified in the launch.json. This setting consists of two options; Synchronize and Recreate. The default value for schemaUpdateMode is set to the Synchronize mode, which means that every time you publish an extension to the development server, the data you entered previously stays. If you do not want to synchronize the sample data with each publish, you can change the schemaUpdateMode setting from Synchronize to Recreate Recreate mode: When you set the schema update mode to Recreate, all the tables and table extensions are recreated at every publish, which means that all the data in those tables are lost. This means that you will get empty records when you publish your extension.

Share Story :

Error resolution to the error “You are not authorized to sign in. Verify that you are using valid credentials and that you have been setup as a user in Microsoft Dynamics NAV”

Introduction: When we restore the SQL database from one server to the other server and when we launch the Microsoft Dynamics NAV RTC, we the error “You are not authorized to sign in. Verify that you are using valid credentials and that you have been setup as a user in Microsoft Dynamics NAV”. This blog article gives the steps how to resolve this error. Pre-requisites: Microsoft Dynamics NAV SQL Server Management Service(SSMS) Reason for the error: When an SQL backup is restored from one server to the other, even the Windows users created in the previous server is restored to the new server which is not present. Hence, the error is thrown. Steps: 1. Open SSMS and select the database restored. 2. Click on new query and type in the below query. USE [Database Name] GO delete from [dbo].[User] delete from [dbo].[Access Control] delete from [dbo].[User Property] delete from [dbo].[Page Data Personalization] delete from [dbo].[User Default Style Sheet] delete from [dbo].[User Metadata] delete from [dbo].[User Personalization] 3. Enter the database name and click on execute. 4. Now restart the server instance and launch the Role Tailored Client(RTC) and make sure a windows user is made in  users in the RTC.

Share Story :

How to configure Visual Studio Code(VS Code) for Extensions in Microsoft Dynamics NAV 2018

Introduction: Developement in Microsoft Dynamics NAV  2018 through extensions is done using Visual Studio Code. This article gives the steps how to configure Visual Studio Code on Microsoft Dynamics  NAV 2018 for Extensions. Pre-requisites: Microsoft Dynamics NAV 2018 CU 1 Visual Studio Code. Steps: 1. Run the Microsoft Dynamics NAV 2018 setup, click on Add or remove components then click on  the Modern Development Environment and select Run from My Computer. 2. Open Dynamics NAV Administration Console, select the server instance and click on Edit. 3. Under the Development tab at the bottom, Enable Developer Service Endpoint and Enable loading application symbol references at server startup. 4. Download Visual studio code from here and install VS Code. Method 1: 1. Open Microsoft VS Code and click on the Extension button at the left hand corner. 2. Install AL Formatter and AL Language. 3. Click on File and click on Open folder and select your folder containing objects in .al format 4. In the launch.json file enter the below credentials. 5. Click on Ctrl+Shift+P and click on download Symbols. This will download the symbols successfully. and VS Code is configured for extension in  NAV 2018 . Method 2 : 1. Unstall AL Formatter and AL Language. 2. Open Microsoft VS Code and click on Extensions under View Menu. 3. This will prompt you to select .vsix file. 4. Navigate to C:\Users\<user name>\Downloads\CU 01 NAV 2018 NA\NAV.11.0.19846.NA.DVD\ModernDev\program files\Microsoft Dynamics NAV\110\Modern Development Environment and select the .vsix file. and click on OK. 5. In the launch.json file enter the below credentials. 6. Click on Ctrl+Shift+P and click on download Symbols. This will download the symbols successfully and VS Code is configured for extension in  NAV 2018.

Share Story :

Improvements in Microsoft Dynamics NAV 2018 Webclient

Introduction: Microsoft Dynamics NAV 2017 Web client had limitations such as the reports couldn’t be previewed. The reports could be saved as .pdf file but we couldn’t preview the reports  as we could do in the Windows Client. With the new release of Microsoft Dynamics NAV 2018, there is availability of Print Preview for non-Internet Explorer browsers. Pre-requisites: Microsoft Dynamics NAV 2018.(with Web Client set up) Summary: 1. Previewing a report in the Dynamics NAV Web client was only possible in Internet Explorer, but is now possible on all supported browsers with the release of Microsoft Dynamics NAV 2018. 2. Now, we can preview a report directly in the client by choosing the Preview button on report request pages. This displays the report by using the new PDF Viewer control, which enables us to use our  keyboard and mouse to navigate the report and download it to our computer. 3.The report preview in the Web client has been refurbished with a new design and additional features. It works with all supported browsers. We preview a report by choosing Preview on the report options page. A toolbar provides several features for working with the report, such as zooming in and out, downloading to file, and more. Two new features include selecting text and panning: • Select text This feature lets you select one or more words, paragraphs, or rows in the report, and then copy and paste it somewhere else, like a page in Financials or a Microsoft Word document. • Pan the document This feature lets you move the visible area of the report in any direction, so you can view other areas. This is helpful when you have zoomed in to see details. Limitation of Microsoft NAV 2018 Web client are mentioned in the below link- https://docs.microsoft.com/en-us/dynamics-nav/browser-limitations-with-the-microsoft-dynamics-nav-web-client

Share Story :

Approval Workflow Setup and Process in Microsoft Dynamics NAV 2017

Introduction: Workflows are a list of steps, each step consists of workflow events, workflow condition and workflow responses. Companies require documents to be approved before they can be released or sent to the customers, vendors etc. E.g If a Purchase order has total amount above 10000, an approval may be required from the hierarchy before sending it across the Vendor. here, we use approval workflow Workflow connects business-process tasks performed by different users. The task can be automatic posting, user tasks or approvals. In this blog I’ll be covering the step-wise procedure to set up approval workflow and explain the process of approval workflows. Pre-requisites: Microsoft Dynamics NAV 2017 Steps: 1. SMTP Mail Setup: Browse SMTP Mail Setup in the search bar. Click on ‘Apply Office 365 Server Settings’. This will populate the SMTP Server , SMTP server port and Authentication is set to Basic. In the User ID enter the default email id through which emails will be sent. Enter the password for the email id set. 2. Approval User Setup Approval user setup is based on the user set up. In the user setup we define users, their limit amount based on their hierarchy and who should approve. We can assign substitute approvers when the direct approvers cannot approve for some reason. We can assign email-id of the approvers. Approval Administrator – this user administers the whole approval process Below is a scenario for Sales order approval. For an approval workflow we need to setup Approval User Setup In the above image there are four users CHRISDSILVA, TEST, MANAGER, CEO The CHRISDSILVA user initiates initiates the approval process for the Sales amount from limit 4000 and above and Purchase amount limit 1000 and above, Request amount limit 1000 and above and TEST will approve it The TEST user initiates the approval process for the Sales amount from limit 7500 and above and Purchase amount limit 1500 and above, Request amount limit 1500 and above and MANAGER will approve it The MANAGER user initiates the approval process for the Sales amount from limit 15000 and above, Purchase amount limit 1000 and above, request amount limit 1000 and above and CEO will approve it. The CEO user has Unlimited sales amount, unlimited purchase amount and unlimited request amount and is the Approval administrator. Click on approval user setup test to check whether the setup is correct. This will run and give the status if the status is correct 3.Notifications set up Click on Notification setup for each user to notify the users in the approval process through note or email. A schedule can also be set up to send the notifications daily, weekly, monthly on a particular time. 4. Workflow setup Browse to workflow from the search bar or to the path CRONUS International Ltd./Departments/Administration/Application Setup/Workflow/Workflows, Click on New workflow from Template. This will prompt to select a workflow category. Select the category eg. Sales document and then select a workflow template eg. Sales order workflow This will open the Sales order workflow Template. The first event is approval of the sales document is requested and the condition is that the document type is Order and status of the document is Open then a list of responses will be executed. First Event Click on the Assit edit button on the Add record restriction line, this will open up the response window. This response will do the following Add record restriction Set document status to Pending Approval : This changes the status of the document in this case the sales document status to Pending Approval. Create an approval request for the record using approver type Salesperson/Purchaser and approver limit type Approver Chain. Click on the third response, a option for selected response window opens. Select the approver type depending upon the requirement – Approver, Salesperson/Purchaser, Workflow User Group. The Due date formula is used to send overdue approval mails after the due date mentioned. The delegate after can be set if the document is not approved then it can be delegated to the substituted approver either never, after 1 day, 2 days, 5 days. Approver type: The approver type can select between Salesperson/purchaser, Approver, workflow user group. Here workflow user group is group of users e.g sales department or purchase manager that must approve. Approver means the approver set up done in the previous step or the system approve based on the salesperson/purchaser that are using sales and purchase document. Approver Limit Type: Options like Approver chain, direct approver, First Qualifier approver, Specific approver. Approver chain: if we have multiple approvers then everyone will get an approval request immediately. E.g. if a user creates sales order which not only exceeds his/her limit but also the limit of the direct approver then approval will be required not only from the Direct approver but also from the hierarchy above the Direct approver. These users will receive an approval request in the approval chain. Direct Approver: here only the Direct approver will receive the approval request First Qualifier Approver: Here if the user creates a sales order which exceeds not only his/her limit but also the limit of the Direct approver then an approval request is directly sent to the hierarchy above the Direct approver. Specific Approver: here we can set a user ID to which the approval request will be send. Send approval request for the record and create a notification. An approval request is sent and a notification is created based on the notifications settings. Second Event An approval request is approved that means all users have approved the approval request so the system checks whether the Pending approvals is 0 then in the response all record restrictions are removed and the document is released. Third Event If the system rechecks and the Pending approval is greater than 0 i.e some approver users have not approved the approval request then again a approval request is sent and a notification is created. Fourth Event An approval request is rejected- The approval request … Continue reading Approval Workflow Setup and Process in Microsoft Dynamics NAV 2017

Share Story :

Upgradation of Data from NAV 2016 to NAV 2017 in Microsoft Dynamics NAV

Introduction: To upgrade the database to NAV 2017, following steps must be completed. Convert the Database Upgrade the Application code Upgrade the Data For Converting the database, refer this link For Upgradation of the Application code, refer this link  This blog describes the steps to Upgrade the Data. Pre-requisites: A FOB file that contains the upgraded application code and upgrade toolkit. All application objects in the old database have been built. The database schema has been synchronized in the old application. All application objects are unlocked. All Microsoft Dynamics NAV Server instance records have been cleared from the dbo.Server Instance table in the old database in SQL Server. Updated permission sets permissions XML files. Windows Poweshell Sql Server Management Service(SSMS) Steps: The first seven steps are completed in the ‘Converting the database from NAV 2016 to NAV 2017’. SQL Backup Upload 2017 Licence Delete all objects from the old version database i.e NAV 2016 Uninstall NAV 2016 and install NAV 2017 Convert the NAV 2016 Database Connect to the server instance Run the Schema synchronization Importing the application objects: Import the all merged file (.fob) created in the upgrade of the application code. The system will prompt to open worksheet Click on Replace All then click on OK. Now import the upgrade code. This upgrade code is located in the NAV DVD in the Upgrade Toolkit folder NAV DVD > UpgradeToolkit >Data conversion Tool Import the Upgrade9001000.FOB file for upgrade from NAV 2016 to NAV 2017. Here 17 objects are imported. Run the Schema Synchronization: Open the Microsoft Dynamics NAV 2017 Development Environment, navigate to Tools menu then click on Sync. Schema For All Tables > With Validation. This will pop up a dialogue box, click on Yes. If Sync.Schema with validation pops up an errors like below ‘There is already an object named ‘CRONUS International Ltd.-$UPG Item Category’ in the database follow the below steps: Launch SSMS(SQL Server Management Studio), expand the Database converted Select the table and run the query to drop it Run the Data Upgrade Process Open the NAV 2017 Development Environment as Administrator. Navigate to Tools tab > Data Upgrade > Start. This will pop up a dialogue box, click on yes. Select the Execution mode as parallel, enable show progress and click on OK. If there are any errors you may get an error dialogue box. To view the error, Open Windows Powershell as Administrator, enter the below command Get-NAVDataUpgrade serverinstancename -Erroronly Get-NAVDataUpgrade Upgrade -Erroronly The above error is shown in the Codeunit 104075,compile the codeunit. The codeunit will pop up errors which needs to be fixed. Once the error is fixed compile all objects then run the Data upgrade process step no 10 This process will continue until all the errors are fixed. The data upgrade process is completed without any errors. Delete the upgraded objects After the upgrade is completed, delete the upgraded objects imported from the Upgrade Toolkit. Filter the upgrade objects by their version list. Select all the upgrade objects and click on Delete Set the Synchronization schema to Force and click on OK  After Deletion, compile all objects. Import upgraded permission set and permissions. Open the NAV 2017 Development Environment, open the NAV 2017 database ‘Demo Database (10-0). Navigate to XMLport 9171 Import/Export Permission Sets and click on Run Choose Export option and click on OK and save the file. Repeat the same procedure for XMLport 9172 Import/Export Permissions Now open the Upgraded database in NAV 2017, navigate to page 9802 Permission Sets and click on Run. Delete all permission sets except Super permission. Run XMLport 9171 to import permission sets, select the Import option then OK Select the permission sets exported  then click on OK. Run the Page 9802 Permission Sets, all the permission set are imported.  Repeat the same for XMLport 9172, import the permissions. Set the language of the upgraded database. Navigate to Tools select the language required then on OK. Add Control Add-ins Browse in the search bar to Control Add-ins to verify the below control Add-ins are present. Dynamics.Nav.Client.BussinessChart Dynamics.Nav.Client.PageReady Dynamics.Nav.Client.PingPong Dynamics.Nav.Client.VideoPlayer Dynamics.Nav.Client.SocialListener Import Payment Service and Data Encryption Key (optional). If we have used payment service in our old database then we need to re-set up payment service in NAV 2017 by importing the key. Browse to Payment service Connection set up in the search bar Click on Upload Key to upload the encrypted key. This key was downloaded in the previous version using the Download key.  To import key for Data Encryption Management, browse to Data Encryption Management in the search bar. Click on Enable Encryption to enable the encryption and import the key using Import Encryption Key. Before importing the key needs to be exported from NAV 2016. Conclusion : After the Upgradation of the Data, the upgradation of  NAV 2016 to NAV 2017 is successfully completed.  

Share Story :

Converting a Database from NAV 2016 to NAV 2017 in Microsoft Dynamics NAV

Introduction: To upgrade the database to NAV 2017,  following main steps must be completed. Convert the database Upgrade the Application code Upgrade the Data This blog gives a steps wise procedure to covert the database from NAV 2016 to NAV 2017 Pre-requisites: Microsoft Dynamics NAV 2016 Microsoft Dynamics NAV 2017 Microsoft SQL Server Management Studio(SSMS) Steps Backup NAV 2016 Database    Open SSMS and connect to the SQL server. Expand the Database to NAV 2016 Database i.e ‘Demo Database (9-0)’. Navigate to Task > Back up. Click on Add then Navigate the path where you want to store the back up(.bak) file by clicking on the Assit edit button. Specify the file name then click on OK. A pop up displays after the back up of NAV 2016 database is taken. Clear all Microsoft Dynamics NAV Server instance records from the dbo.ServerInstance table in the database on SQL Server.You can do this by using SQL Server Management Studio to open and clear the table. Upload 2017 Licence file in NAV 2016 Database ‘Demo Database (9-0)’ Navigate to File > Database > Alter. In the Integration tab, Enable Save licence file and select the licence file of NAV 2017 then click on OK. Alternatively, Select the Tools menu > Licence Information then Upload. Restart the NAV Server Instance in the Microsoft Dynamics NAV admin. Uninstall NAV 2016 and Install NAV 2017. Convert the NAV 2016 Database to NAV 2017. Open Microsoft Dynamics NAV 2017 Development Environment, select the NAV 2016 database i.e ‘Demo Database (9-0) and click on OK. Till will prompt to convert the database dialogue box. Click on OK. A confirmation dialogue box pops up. Click on OK. This will take few minutes. A message pops up once the database is converted. Connect the Server Instance to the converted database Open Microsoft Dynamics NAV Administration, Click on Add Instance. Specify a Server name and unique port numbers then click on OK. An instance is created, open the instance, click on edit, expand the Database tab. In the Database Name specify the converted database name then Restart the instance. In the below screenshot NAV90 is the server instance name for the converted database. Open the converted database in the NAV 2017 Development Environment. Navigate to the Tools menu > Options. Specify the Server Instance name, Server Port and the Management port. Click on OK. Make sure the user login has access to the Converted database. Open SSMS, expand Logins and select the user. Under the ‘Select a page’ tab, Select User Mapping, enable map for the converted database and master database and enable db_owner then click on OK Under master database, expand the Tables, select the Dbo.$ndo$srvproperty then properties. elect the Permissions then select the user and grant Select permission to the user. Restart the Server instance after applying the above permissions. Run the schema synchronization to initialize the database. Open the Microsoft Dynamics NAV 2017 Development Environment, navigate to Tools menu then click on Sync. Schema For All Tables > With Validation. This will pop up a dialogue box, click on Yes. After synchronizations, navigate to Tools menu > Build Server Application Objects. Building the application makes sure that the database is also synchronized in the SQL server and compiled. Building the application may lead to compilation errors which needs to be fixed. Follow the below link to fix .NET variable errors refer this link Build the Application again until the Build is successful. Conclusion: The database is successfully converted to NAV 2017. The next step is Upgrade the Application code for which you can refer this link

Share Story :

Error Resolution of Web client reply address for SSO in Dynamics NAV

Introduction: A Single Sign-on (SSO) user experience is achieved between Microsoft Dynamics NAV and the Office 365 Web Applications where the User is authenticated using Office 356 credentials to access NAV Windows client and Webclient. Error: After configuration of SSO in NAV, the Windows client configures SSO successfully but the Web client throws an error. AADSTS50011: The reply address http://localhost/DynamicsNAV100/WebClient/SignIn.aspx?ReturnUrl=%2fDynamicsNAV100%2fWebClient%2f does not match the reply addresses configured for the application: http://localhost/DynamicsNAV100/WebClient/.  Pre-requisites: Microsoft Dynamics NAV 2017 Internet Information Services(IIS) Resolution of the Error: Browse to Internet Information Service(IIS) Select on Microsoft Dynamics NAV, then click on Bindings Click on Add. In the Type Field select ‘https’. In the SLL certificate, select the self-signed certificate generated from the drop down. Click on Restart. Click on Browse link of the Web server Instance and save the url. Configure SSO for Dynamics NAV and in the below command Set-NavSingleSignOnWithOffice365 -AuthenticationEmail “YourAuthenticationEmail” -NavServerInstance “YourNAVServerInstance” -NavUser “YourNavUser” -NavWebAddress “YourNavWebClientAddress” -NavServerCertificateThumbprint “YourNAVServerCertificateThumbprint” -NavWebServerInstanceName “YourNavWebServerInstanceName copy the url saved in the “YourNavWebClientAddress” address. After Binding, Enter your Office 365 credentials and sign in. SSO works successfully for Web client after Binding of the SLL certificate.  

Share Story :

Exporting record details to excel using Excel Buffer in Microsoft Dynamics NAV 2017

Introduction In this article, the selected record details by the user are exported to excel using Excel Buffer. The requirement was such that Purchase Request is sent to the Vendors to enter the Unit cost of each Purchase Items. These details are sent to the vendors in an excel sheet. After the Unit cost is entered the excel sheet is imported again in the Dynamics NAV. Pre-requisites: Microsoft Dynamics NAV 2017 Steps: 1.Create a report and Data link between the records. 2. Below is the screenshot of the Data Item Link 3. In the globals (Ctrl+G), define the excel buffer table (no 370) to create excel sheet 4. Define the function MakeExcelDataHeader to create the header of the excel sheet and MakeExcelDataBody for the Body Lines. 5. Create a Boolean variable Print to Excel and insert it in the request page. If true then call the function CreateExcelBook. 6. On the PreDataItem Call the function MakeDataExcelHeader and OnAfterGetRecords call the function MakeDataBody 7. Using Excel Buffer table code as below in the functions 8. In the Page, create an action button to run the report. 9. In the page, select the record and click on the Export to Excel button 10. Click on OK 11. This call the report and fetches the data records in an excel sheet. This sheet is then sent to the vendor to enter the unit cost of the respective item. Conclusion: Thus using excel buffer record we can export records from Microsoft Dynamics NAV to Excel sheets.  

Share Story :

To run a batch to check for visa expiry date of employees and send an email if visa expires in a month in Dynamics NAV

Introduction: This article focuses on to creating a batch to run everyday to check for employee’s visa expiry date. If the visa expires in a month an email notification is sent to the HR Manager about the visa expiry of the respective employee. Pre-requisites: Microsoft Dynamics NAV 2017 Steps: Create a new codeunit with id and name. Set up the SMTP mail setup in NAV. 3. In the Globals (Ctrl+G),create a record for employee table. 4. Create a function and call it on run. 5. Here in the above code calculate the previous months date of the visa expiry date and if the the date is today then an email is send using smtp mail 6. Create a job queue to run every day. Set the start time and end time. 7. An email is sent if today’s date is the previous month date of visa expiry.  

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange